<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%>
<%@ page import="tw.com.msig.b2c.car.setting.vo.CityVo"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/layout/meta.jsp" />
</head>
<body>
	<div id="header">
		<jsp:include page="/layout/header.jsp" />
	</div>
	<div id="navigator">
		<jsp:include page="/layout/navigator.jsp" />
	</div>
	<div id="container">

		<a
			href="<%=request.getContextPath()%>/settings/cityCode.do?sActionType=add"
			class="btn btn-sm btn-primary" data-loading-text="Loading"
			id="addBtn">新增</a>

		<table id="resultTable" class="table table-striped table-bordered">
			<thead>
				<tr>
					<th style="width: 150px">功能</th>
					<th style="width: 150px">代碼</th>
					<th>名稱</th>
				</tr>
			</thead>
			<tbody>
				<%
					List<CityVo> models = (List<CityVo>) request.getAttribute("models");

					for (CityVo model : models) {

						//pageContext.setAttribute("model", model);
				%>
				<tr>
					<td><a
						href="<%=request.getContextPath()%>/settings/cityCode.do?sActionType=edit&id=<%=model.getId()%>"
						class="btn btn-sm btn-success" data-loading-text="Loading"
						id="editBtn_<%=model.getId()%>">修改</a>
						<a
						href="<%=request.getContextPath()%>/settings/cityCode.do?sActionType=delete&id=<%=model.getId()%>"
						class="btn btn-sm btn-danger" data-loading-text="Loading"
						id="deleteBtn_<%=model.getId()%>">刪除</a>
					</td>
					<td><%=model.getCode()%></td>
					<td><%=model.getName()%></td>
				</tr>
				<%
					}
				%>
			</tbody>
		</table>


	</div>
</body>
</html>